package com.itboye.zhujia.home;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

import com.itboye.zhujia.R;
import com.itboye.zhujia.adapter.MyFaBuAdapter;
import com.itboye.zhujia.base.BaseActivity;
import com.itboye.zhujia.base.MyApplcation;
import com.itboye.zhujia.custom.MyListView;

/**
 * 我的发布
 * 
 */
public class ActivityMyFaBu extends BaseActivity implements OnClickListener {
	private ImageView close_icon;// 返回图片
	private TextView add_shap_title_tv;// 标题

	MyListView fabu_listView;

	MyFaBuAdapter adapter;

	List<Map<String, Object>> list;

	@Override
	public int initView() {
		return 0;
	}

	@Override
	public void onMyCreate() {
		setContentView(R.layout.activity_my_fa_bu);

		add_shap_title_tv.setText("我的发布");

		adapter = new MyFaBuAdapter(MyApplcation.ctx, source());

		fabu_listView = (MyListView) findViewById(R.id.fabu_listView);
		fabu_listView.setAdapter(adapter);

	}

	private List<Map<String, Object>> source() {

		list = new ArrayList<Map<String, Object>>();
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("zt", "状态：待预订");
		map.put("img", R.drawable.app_loading0);
		map.put("title", "青龙湾三期南区  3室1厅");
		map.put("content", "青龙湾三区  三室一厅  朝南  172平");
		map.put("zt02", "状态：待预订");
		map.put("money", "2300元/月");
		map.put("xiajia", "下架房源");
		map.put("shuaxin", "刷新置顶");
		map.put("fuwu", "付佣服务");
		map.put("xuanze", "选择租客");
		list.add(map);

		return list;
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.close_icon:
			finish();
			break;

		default:
			break;
		}

	}

}
